// 引入路由文件
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 引入tabnav的四个组件
import index from './components/tabnav/index.vue'
import vip from './components/tabnav/vip.vue'
import car from './components/tabnav/car.vue'
import myinfo from './components/tabnav/myinfo.vue'
import news from './components/six-grid/news/news.vue'
import newsinfo from './components/six-grid/news/newsinfo.vue'
import imgs from './components/six-grid/imgs/imgs.vue'
import imginfo from './components/six-grid/imgs/imginfo.vue'
import goods from './components/six-grid/goods/goods.vue'
import goodsinfo from './components/six-grid/goods/goodsinfo.vue'
import tuwen from './components/six-grid/goods/tuwen.vue'
import com from './components/six-grid/goods/com.vue'
// 暴露路由                                                                                                      
export default new VueRouter({
    routes: [
        // tabbar的四个路由
        { path: '/', redirect: '/index' },
        { path: '/index', component: index },
        { path: '/vip', component: vip },
        { path: '/car', component: car },
        { path: '/myinfo', component: myinfo },
        // 首页六宫格的新闻和新闻详情
        { path: '/index/news', component: news },
        { path: '/newsinfo/:id', component: newsinfo },
        { path: '/index/imgs', component: imgs },
        { path: '/imginfo/:id', component: imginfo },
        { path: '/index/goods', component: goods },
        { path: '/goodsinfo/:id', component: goodsinfo },
        { path: '/tuwen/:id', component: tuwen },
        { path: '/com/:id', component: com },

    ],
    // 点击高亮
    linkActiveClass: 'mui-active'
})